package com.motos;

public final class Bus extends Moto  {
    private int seatcount;

    public Bus() {
    }

    public Bus(String no, String color,int seatcount) {
//        super(no, color);
        this.setNo(no);
        this.setColor(color);
        this.seatcount = seatcount;
        if (seatcount>=15) {
            this.setPrice(1500);
        }
        else this.setPrice(800);
    }

    public int getSeatcount() {
        return seatcount;
    }

    public void setSeatcount(int seatcount) {
        this.seatcount = seatcount;
    }
    public double calcRent(int days){
        return days* getPrice();
    }

    @Override
    public String toString() {
        return this.getNo()+"\t"+this.getSeatcount()+"\t"+this.getColor()+"\t"+this.getPrice();

    }

    @Override
    public void navigate() {
        System.out.println("导航已实现");
    }
}
